import cv2
import numpy as np

img=cv2.imread('CV-Pictures/dilation.bmp')
# cv2.imshow('img',img)
# kernel=cv2.getStructuringElement(cv2.MORPH_RECT,(15,15))
# dilate_img=cv2.dilate(img,kernel)
# cv2.imshow('dilate_img',dilate_img)

img=np.zeros((600,600),np.uint8)

cv2.circle(img,(300,300),120,(255,255,255),-1)
cv2.rectangle(img,(50,50),(180,180),(255,255,255),-1)
kernel=cv2.getStructuringElement(cv2.MORPH_RECT,(60,20))
dilate_img=cv2.dilate(img,kernel)
cv2.imshow('img',img)
cv2.imshow('dilate',dilate_img)
cv2.waitKey(0)
cv2.destroyAllWindows()